package com.situ.spring.proxy;

import org.junit.Test;

public class Client {
	
	public static void main(String[] args) {
		DongShiZhang dongShiZhang = new DongShiZhang();
		ISubject miShu = new MiShu(dongShiZhang);
		miShu.qianzi();
	}
	
	@Test
	public void test() {
		// 目标对象
		ISubject subject = new DongShiZhang();
		// 给目标对象创建代理对象
		ISubject proxy = (ISubject) ProxyFactory.getProxyInstance(subject);
		proxy.qianzi();
	}
}
